package com.carltechnology.mahjonggamecaculation.dao;

import com.carltechnology.mahjonggamecaculation.mode.IDetailGameData;
import com.carltechnology.mahjonggamecaculation.mode.IGameData;
import com.carltechnology.mahjonggamecaculation.mode.IGameRuntimeData;

import rx.Subscriber;

/**
 * Created by WZTCM on 2016/6/28.
 */
public interface IMahjongGameDataSourceComponent {
    /**
     * we put in the subscriber into our component.Then we the mode we get from database will be
     * passed into the subscriber.
     *
     * @param subscriber the subscriber for catching data.
     */
    void getMahjongGameData(Subscriber<? super IGameData> subscriber);

    /**
     * we use id and subscriber to catch the data mode in database.And Then we deal with
     * the mode list in subscriber.
     *
     * @param id         the data id,id stand for the mahjong game
     * @param subscriber the subscriber for catching data.
     */
    void getMahjongDetailData(final int id, Subscriber<? super IDetailGameData> subscriber);

    /**
     * we put in the subscriber into our component.Then we the mode we get from database will be
     * passed into the subscriber.
     *
     * @param subscriber the subscriber for catching data.
     */
    void getMahjongRuntimeData(Subscriber<? super IGameRuntimeData> subscriber);
}
